package com.sssre.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sssre.common.annotation.Excel;
import com.sssre.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 结算单对象 bus_statement
 *
 * @author 浪兎兎
 * @date 2025-04-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BusStatement extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    public static final Integer STATUS_CONSUME = 0;//消费中
    public static final Integer STATUS_PAID = 1;//已支付

    public static final Integer  NOT_DELETED = 0;//消费中
    public static final Integer DELETED = 1;//已支付

    /**
     * 客户姓名
     */
    @Excel(name = "客户姓名")
    private String customerName;

    /**
     * 客户联系方式
     */
    @Excel(name = "客户联系方式")
    @NotNull(message = "客户联系方式不能为空")
    private String customerPhone;

    /**
     * 实际到店时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际到店时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "实际到店时间不能为空")
    private Date actualArrivalTime;

    /**
     * 车牌号码
     */
    @Excel(name = "车牌号码")
    @NotNull(message = "车牌号码不能为空")
    private String licensePlate;

    /**
     * 汽车类型
     */
    @Excel(name = "汽车类型")
    @NotNull(message = "汽车类型不能为空")
    private String carSeries;

    /**
     * 服务类型
     */
    @Excel(name = "服务类型")
    @NotNull(message = "服务类型不能为空")
    @Min(value = 0, message = "非法参数")
    @Max(value = 2, message = "非法参数")
    private Integer serviceType;

    /**
     * 预约单ID
     */
    @Excel(name = "预约单ID")
    private Long appointmentId;

    /**
     * 结算状态
     */
    @Excel(name = "结算状态")
    private Integer status;

    /**
     * 收款时间
     */
    private Date payTime;

    /**
     * 收款人id
     */
    private Long payeeId;

    /**
     * 总消费金额
     */
    private BigDecimal totalAmount;

    /**
     * 服务项数量
     */
    private BigDecimal totalQuantity;

    /**
     * 折扣金额
     */
    private BigDecimal discountAmount;

    /**
     * 备注信息
     */
    private String info;

    /**
     * 删除状态
     */
    private Integer isDelete;


}
